package com.heima.article.feign;

import com.heima.model.admin.pojos.AdChannel;
import com.heima.model.admin.pojos.AdSensitive;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("leadnews-admin")
public interface AdminFeign {

    @GetMapping("/api/v1/sensitive/findAll")
    public ResponseResult<List<AdSensitive>> findAll() ;


    @GetMapping("/api/v1/channel/findById/{id}")
    public ResponseResult<AdChannel> findById(@PathVariable("id") Integer id);

    @GetMapping("/api/v1/channel/findAll")
    public ResponseResult<List<AdChannel>> getAll();
}